package org.ohos.sample.webview;

import com.ffsky.litepack.Lite;
import ohos.aafwk.ability.AbilityPackage;
import ohos.app.ElementsCallback;
import ohos.global.configuration.Configuration;
import org.ffsky.jsplugin.JsPluginManager;
import org.ohos.sample.builder.AppAbilityLifecycleCallbacks;

public class SampleApplication extends AbilityPackage {

    private AppAbilityLifecycleCallbacks mAppAbilityLifecycleCallbacks;
    @Override
    public void onInitialize() {
        super.onInitialize();
        mAppAbilityLifecycleCallbacks = new AppAbilityLifecycleCallbacks();
        Lite.Builder.create()
                .setAbilityPackage(this)
                .setAppInterface(mAppAbilityLifecycleCallbacks)
                .apply();

        registerCallbacks(mAppAbilityLifecycleCallbacks, new ElementsCallback() {
            @Override
            public void onMemoryLevel(int i) {
            }
            @Override
            public void onConfigurationUpdated(Configuration configuration) {
            }
        });
    }
}
